<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="text" placeholder="请输入0-100" v-model="num">
    <input type="button" value="猜" @click="f">
    <h3>
        结果：{{数字}}
    </h3>
</div>
<script src="../day06/vue.min.js"></script>
<script>
    let x = parseInt(Math.random() * 100) + 1;
    let v = new Vue({
            el: "body>div",
            data: {
                数字: " ", num: " "
            },
            methods: {
              f(){
                  if (v.num>x){
                      v.数字= "猜大了";
                  }else if (v.num<x){
                      v.数字="猜小了";
                  }else {
                      v.数字="猜对了";
                  }
              }
    }
    })
</script>

</body>

</html>